Skip to main content

All Questions

Tagged with
1vote
1answer
91views

How to configure Debian sudo to prompt for password at the beginning of every login session?

I am running Debian 12 and working on hardening my system. I'm looking at the sudo behavior at the moment. As expected, if I ssh into the system and run a sudo command, it prompts the first time, but ...
BobDoolittle's user avatar
1vote
1answer
165views

Suggestion for sudo over ssh

I need two suggestions for making my script working from local server as well as ssh execution 1. How to update the sudoers In server i have a path /var/log/data/status/ all files of parent and ...
iamsage's user avatar
-1votes
2answers
1kviews

running systemctl via ssh without asking for password [closed]

I want to run ssh without asking for a password and invoke systemctl without a password I tried doing the following: ssh -t <user>@<host> "echo <password> | sudo -S systemctl ...
Daniel's user avatar
1vote
1answer
220views

How can I pipe an alias that requires sudo through SSH?

I've set up so that I can SSH securely into my home PC from my laptop. Today, I tried running an update just to test, but I couldn't do it from the laptop. What I basically wanted to do, was to pass ...
telometto's user avatar
0votes
0answers
147views

Disable everything but a hidden command for root access

linux security and root access question.... I'm setting up a server that has a validator node running on it for a blockchain. I was trying to harden the security of my server. I set up ufw for all ...
brent-franklin's user avatar
0votes
2answers
891views

Is there a way to perform a full login as another user without being root?

In our setup, we are forced to use Microsoft Active Directory (AD) for ssh access to our Linux VM, so that when employees leave they can be blocked from accessing the VM once their AD account is ...
dnk8n's user avatar
2votes
1answer
3kviews

How to confirm linux root password from ssh root?

How can I check a remote machines root password? I have a remote machines that are normally accessed via ssh root and other users. For security purposes I have a script to change all keys and user ...
dave.zap's user avatar
0votes
1answer
120views

How do I add an entry to the end of the line in bash [closed]

I have a sudoers file that I'm trying to add /usr/sbin/ifconfig at the end of a line. So what I'm trying to accomplish is this: devops ALL=(root) NOPASSWD: /usr/sbin/ifconfig, /usr/sbin/ethtool, /...
user5352090's user avatar
0votes
1answer
3kviews

sudo: pam_authenticate: Conversation error

Unable to execute shell script, receiving the errors The shell script I wrote connects to remote server over ssh and executes commands. sudo: no tty present and no askpass program specified sudo: ...
karthik v's user avatar
0votes
1answer
68views

What config files I need to verify to make sudo work?

I am new to Linux. I have created 2 Azure VMs based on Cent OS 7.4 for learning purposes. For the first machine, I provided SSH keys during the create procedure. I use the private key via putty and ...
B K's user avatar
-1votes
2answers
1kviews

ssh to server and auto execute sudo command and keep the shell open

I want an alias on my local machine that will ssh to the target system, execute sudo using the password stored on my local machine, but leave the shell open on the remote system. The reason is I'm ...
Jonathan's user avatar
2votes
2answers
355views

Setting up users for ubuntu for ssh connection

I have created a new Ubuntu server and in root user, I created a new user. The steps I followed: sudo adduser tom sudo su - tom mkdir .ssh chmod 700 .ssh touch .ssh/authorized_keys chmod 600 .ssh/...
senty's user avatar
16votes
6answers
63kviews

How to remote execute ssh command a sudo command without password

I have a linux (debian based) server which is configured to allow SSH session to the user 'admin', but not the user 'root'. Both these accounts are linked somehow because they share the same password. ...
izack's user avatar
1vote
2answers
1kviews

How do I disable tty for one user only using Sudoers.d file?

I need to disable tty for one user over SSH only. What should I put in a file that I will place in sudoers.d?
Matt B's user avatar
3votes
2answers
6kviews

How to use SSH to run a shell script on a remote machine?

I'd like to execute some sudo privilege commands using bash script from local to remote server via ssh without passing multiple commands separating from semicolons on ssh. I've tried below step but ...
BDN's user avatar
  • 341

153050per page
close